#include <iostream>
using namespace std;

long fibonacci(int n)
{
    long *fib = new long[n + 1];
    fib[0] = 1;
    fib[1] = 1;
    for (int i = 2; i <= n; i++)
    {
        fib[i] = fib[i - 1] + fib[i - 2];
    }
    return fib[n];
}
int main()
{
    int n = 9;
    long result = fibonacci(n);
    cout << "斐波那契数列第10位数为: " << result << endl;
    return 0;
}
